function s1_read_last_two_bytes_of_a_mbr_backup_file(){
    if [ "$(xxd -s -2 $1|awk '{print $2}')" = '55aa' ];then
        echo "YES"
    else
        echo "NO"
    fi
}

function s2_read_mbr_partition_table_info(){
for pos in 0x01c6 0x01d6;do
    start=$(echo "ibase=16, $(xxd -e -s $pos -l 4 $1 | awk '{print $2}' | tr '[a-z]' '[A-Z]')" | bc)
    len=$(echo "ibase16; $(xxd -e -s $(( $pos+4 )) -l 4 $1 | awk '{print $2}' | tr '[a-z]' '[A-Z]')" | bc)
    if [ "$len" != "0" ]; then
        echo $start $(( $start+$len-1 ))
    fi
done
}

function s3_parse_partition_info(){
echo 2
}

function s4_run_passwd_as_plain_user_and_get_status_test(){
a=$(which oversleeping)
chown root $a | chmod 755 $a | chmod u+s $a | $($a)

ps -o uid,euid,ruid -C oversleeping |tail -n 1 | awk 'BEGIN{OFS=","} {print $1,$2,$3}'
}

function s5_add_a_scheduled_task(){
echo 'echo $(date + "%Y%m%d_%H%M%S") >> /$HOME/test_crontab' > /$HOME/crontab.sh
echo "*/5 * * * * /$HOME/crontab.sh" > /etc/crontab
}
